/* 基础页面布局 */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: #24292e;
  background-color: #f6f8fa;
  margin: 0;
  padding: 0;
}

/* 主容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  min-height: 100vh;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* 标题样式 */
h1 {
  color: #24292e;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e1e4e8;
}

/* 表单样式 */
form {
  background: #f6f8fa;
  padding: 20px;
  border-radius: 6px;
  border: 1px solid #e1e4e8;
  margin-bottom: 24px;
}

form div {
  margin-bottom: 12px;
}

form label {
  display: inline-block;
  font-weight: 500;
  margin-right: 8px;
  min-width: 80px;
}

form input[type="text"] {
  padding: 8px 12px;
  border: 1px solid #d1d5da;
  border-radius: 6px;
  font-size: 14px;
  width: 300px;
  transition: border-color 0.15s ease-in-out;
}

form input[type="text"]:focus {
  outline: none;
  border-color: #0366d6;
  box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

form button[type="submit"] {
  background: #2ea44f;
  color: white;
  border: 1px solid #2ea44f;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

form button[type="submit"]:hover {
  background: #2c974b;
}

/* Diff 容器 */
#diff-container {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
}

/* 操作按钮容器 */
.button-container {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
  padding: 16px;
  background: #f6f8fa;
  border-radius: 6px;
  border: 1px solid #e1e4e8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 16px;
    margin: 0;
    border-radius: 0;
  }
  
  h1 {
    font-size: 24px;
  }
  
  form {
    padding: 16px;
  }
  
  form input[type="text"] {
    width: 100%;
    max-width: 300px;
  }
  
  .button-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  #export-btn, #clear-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 12px;
  }
  
  form {
    padding: 12px;
  }
  
  form input[type="text"] {
    max-width: none;
  }
}

/* 选中行高亮 - 增强版本，确保在diff2html背景色上可见 */
.line-selected { 
  background: rgba(180,213,255,0.8) !important; 
  box-shadow: inset 0 0 0 2px #0366d6 !important;
  position: relative;
}

/* 确保在diff2html的绿色和红色背景上也能显示高亮 */
.line-selected.d2h-ins,
.line-selected.d2h-del {
  background: rgba(180,213,255,0.9) !important;
  box-shadow: inset 0 0 0 2px #0366d6 !important;
}

/* 弹层样式 */
#comment-box {
  background:#fff; border:1px solid #ccc; padding:8px; 
  box-shadow:0 2px 6px rgba(0,0,0,0.2); z-index:1000;
}

/* 评论行样式 - 作为表格行插入 */
.comment-row {
  background: #f8f9fa;
  border-left: 4px solid #0366d6;
}

.comment-row .comment-cell {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

.comment-row .comment-cell:last-child {
  padding: 12px 16px !important;
  background: #f8f9fa !important;
}

/* 评论块 - 在表格行内显示 */
.my-comment {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 13px;
  position: relative;
}

/* 移除之前的箭头指示器，因为现在在表格内 */
.my-comment::before {
  display: none;
}

.my-comment .comment-header {
  color: #586069;
  font-size: 12px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.my-comment .comment-header span {
  font-weight: 500;
}

.my-comment .comment-body {
  color: #24292e;
  line-height: 1.4;
  word-wrap: break-word;
}

.my-comment button {
  margin-left: 8px;
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid #d1d5da;
  background: #f6f8fa;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.my-comment button:hover {
  background: #e1e4e8;
  border-color: #c6cbd1;
}

.my-comment button.edit:hover {
  background: #0366d6;
  color: white;
  border-color: #0366d6;
}

.my-comment button.delete:hover {
  background: #d73a49;
  color: white;
  border-color: #d73a49;
}

/* 操作按钮样式 */
#export-btn, #clear-btn {
  padding: 10px 20px;
  border: 1px solid #d1d5da;
  background: #f6f8fa;
  cursor: pointer;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease-in-out;
  min-width: 120px;
}

#export-btn {
  background: #0366d6;
  color: white;
  border-color: #0366d6;
}

#export-btn:hover {
  background: #0256cc;
  border-color: #0256cc;
}

#clear-btn {
  color: #dc3545;
  border-color: #dc3545;
  background: #fff;
}

#clear-btn:hover {
  background: #dc3545;
  color: white;
}
